﻿@page
@using WXWorkSvc.Common.Extensions;
@inject WXWork3rd wx;
@model WXWorkSvc.Third.Areas.D.Pages.User.EditModel
@* Mobile *@
@{
    ViewData["Title"] = "编辑用户";
}
<wx-detail asp-for-1="Item.UserName" asp-for-2="Item.UserId" />

<form method="post">
    <input type="hidden" asp-for="Item.UserId" />

    <div class="weui-cells__title">角色设置</div>
    <div class="weui-cells weui-cells_checkbox" style="margin:0;padding:0">
        @for (int i = 0; i < Model.Items.Count; i++)
        {
            <input type="hidden" asp-for="Items[i].Key" />
            <label class="weui-cell weui-check__label" asp-for="Items[i].Name">
                <div class="weui-cell__hd">
                    <input type="checkbox" class="weui-check" asp-for="Items[i].Name" />
                    <i class="weui-icon-checked"></i>
                </div>
                <div class="weui-cell__bd">
                    <p>@Model.Items[i].Key</p>
                </div>
            </label>
        }
    </div>
    <wx-buttons asp-link-text-1="保存" asp-link-type-1="Common.Models.EButtonType.Primary"
                asp-link-text-2="取消" asp-page-2="./Index" />


</form>
@section Scripts {
    @{
        await Html.RenderPartialAsync("_ValidationScriptsPartial");
    }
    @Html.Raw(await wx.GetAgentJsConfigAsync(Request, User.GetCorpId()))
}
